#ifndef MID_METH_H
#define MID_METH_H
 
typedef int (*MID_Sym_Encrypt)(
	const int sgdalgid, const unsigned char *chrIn, const int nInLen, 
	const unsigned char *chrKey, const int nKeyLen, unsigned char *chrIv, int nIvLen,  
	unsigned char *chrOut, int *nOutLen);

typedef int (*MID_Sym_Decrypt)(const int sgdalgid, const unsigned char *chrIn, const int nInLen, 
	const unsigned char *chrKey, const int nKeyLen, unsigned char *chrIv, int nIvLen,  
	unsigned char *chrOut, int *nOutLen);

typedef int (*MID_Digest_Init)(
    const int sgdalgid, const unsigned char *key, const int keylen, 
    const unsigned char *userid, const int useridlen, unsigned char *ctx, int *ctxlen);

typedef int (*MID_Digest_Update)(
    const unsigned char *data, const int datalen, unsigned char *ctx, const int ctxlen);

typedef int (*MID_Digest_Final)(unsigned char *ctx, const int ctxlen, unsigned char *out, int *outlen);


typedef struct _mid_funcs {
    MID_Sym_Encrypt symEncrypt;
    MID_Sym_Decrypt symDecrypt;
    MID_Digest_Init digestInit;
    MID_Digest_Update digestUpdate;
    MID_Digest_Final digestFinal;
} MID_FUNCS;

#endif